package ship;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeSet;

public class ShipDemo {
	public static void main(String[] args) {
		ShipComparator comparator = new ShipComparator();
		ArrayList<Ship> list = new ArrayList<Ship>();

		Ship sh = new Ship(400, 7, "Titanic");
		Ship sh1 = new Ship(4, 7, "Santa Marina");
		Ship sh2 = new Ship(49, 7, "Queen Mary");
		
		Collections.
	//	TreeSet set = new TreeSet(/*comparator*/);
		System.out.println(sh.hashCode());
	//	HashSet set = new HashSet<>();
//		set.add(sh);
//		set.add(sh1);
//		set.add(sh1);
		Map<String, Ship> map = new HashMap<String, Ship>();
		map.put("Titanic",sh);
		map.put("Santa Marina",sh1);
		map.put("Queen Mary",sh2);
		//set.comparator();
//		for(Iterator<Ship> it = set.descendingIterator(); it.hasNext();){
//			System.out.println(it.next());
//		}
		for(Iterator it = map.keySet().iterator(); it.hasNext();){
			String key = (String)it.next();
		}
	}
}
